/* -----------------------------------------------------------------------
 * Name:   Krishan Kodali
 * Course: CS 362
 * Date:   01/26/14
 * unittest2.c is to test FullDeckCount() funtion in dominion.c
 * -----------------------------------------------------------------------
 */

#include "dominion.h"
#include "dominion_helpers.h"
#include "rngs.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>


void checkFullDeckCount(struct gameState *pre) {
  struct gameState p;
  int return_val;
  memcpy (&p, pre, sizeof(struct gameState));
  p.deckCount[1] = 0;
  p.handCount[1] = 5;
  p.discardCount[1] = 5;
  return_val = fullDeckCount(1, 0, &p);
  printf("expected: %d, actual: %d\n", 10, return_val);
  assert(return_val == 10);
}

int main () {
  int k[10] = {adventurer, council_room, feast, gardens, mine,
	       remodel, smithy, village, baron, great_hall};
  struct gameState G;
  printf ("TESTING fullDeckCount\n");
  printf ("=====================\n");
  initializeGame(2, k, 1, &G);

  checkFullDeckCount(&G);
  printf ("TEST OK\n");
  return 0;
}
